from django.conf.urls import patterns, include, url
from models import Experto
from forms import ExpertoForm
from django.views import generic
import autocomplete_light
urlpatterns = patterns('expertos.views',
                       
    url(r'^$', 'listar',name='experto_listar'),
    url(r'^filtrar/$', 'filtrar',name='experto_filtrar'),
    url(r'^aprobar/$', 'aprobar',name='experto_aprobar'),
    url(r'^aprobar/(?P<user_id>\d+)/$', 'aprobar_confirmar',name='experto_aprobar_confirmar'),
    url(r'^aprobar/(?P<user_id>\d+)/form/$', 'aprobar_confirmar_sin_form',name='experto_aprobar_confirmar_sin_form'),
    url(r'^(?P<object_id>\d+)/$', 'ver',name='experto_ver'),
    url(r'^crear/$', 'crear',name='experto_crear'),
    url(r'^(?P<object_id>\d+)/editar/$', 'editar',name='experto_editar'),
    url(r'^(?P<object_id>\d+)/eliminar/$', 'eliminar',name='experto_eliminar'),
    url(r'add/$', 
        autocomplete_light.CreateView.as_view(model=Experto,form_class=ExpertoForm), 
        name='experto_create'),
    url(r'(?P<pk>\d+)/update/$', generic.UpdateView.as_view(
        model=Experto,form_class=ExpertoForm ), name='experto_update'),
)